/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Config;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.HashSet;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import java.util.Set;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetConfig
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 43 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 44 */     Provisioning prov = Provisioning.getInstance();
/*    */     
/* 46 */     Element a = request.getElement("a");
/* 47 */     String name = a.getAttribute("n");
/*    */     
/* 49 */     Config config = prov.getConfig();
/*    */     
/* 51 */     AdminAccessControl aac = checkRight(zsc, context, config, AdminRight.PR_ALWAYS_ALLOW);
/*    */     
/* 53 */     Element response = zsc.createElement(AdminConstants.GET_CONFIG_RESPONSE);
/*    */     
/* 55 */     Set<String> reqAttrs = new HashSet();
/* 56 */     reqAttrs.add(name);
/* 57 */     GetAllConfig.encodeConfig(response, config, reqAttrs, aac.getAttrRightChecker(config));
/*    */     
/* 59 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 64 */     notes.add("Need get attr right for the specified attribute.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */